<?php

use yii\db\Migration;
use yii\db\Schema;

class m170608_074604_ADD_COLUMN_PRODUCT_STOCK_TYPE extends Migration
{
    public function up()
    {
         $this->addColumn('{{product}}', 'stock', Schema::TYPE_INTEGER. "(1)  DEFAULT  '2' COMMENT '1 库存格式1  / 2 库存自定义格式'");
    }

    public function down()
    {
        echo "m170608_074604_ADD_COLUMN_PRODUCT_STOCK_TYPE cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
